import {
  INCOME_AND_EXPENDITURE_TYPE_LIST,
} from '@/const/type';
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    menuWidth: 80,
    searchLabelWidth: 120,
    labelWidth: 120,
    delBtn: false,
    addBtn: false,
    column: [
      {
        label: '规则编号',
        prop: 'code',
        editDisplay: false,
      },
      {
        label: '是否启用',
        prop: 'status',
        editDisplay: false,
      },
      {
        label: '类型',
        prop: 'type',
        search: true,
        type: 'select',
        dicData: INCOME_AND_EXPENDITURE_TYPE_LIST,
        editDisabled: true,
      },


      {
        label: '事项',
        prop: 'name',
        editDisabled: true,
      },
      {
        label: '',
        prop: 'tips',
        row:true,
      },
      {
        label: '配置项',
        prop: 'config',
        hide: true,
        span: 24,
      },

      {
        label: '备注',
        prop: 'remark',
        type:'textarea',
        overHidden: true,
        showWordLimit: true,
        rules:[
          {
            required: false,
            min: 0,
            max: 200,
            message: '长度不能超过200个字符',
            trigger: 'blur',
          },
        ]
      },
    ],
  };
};
